package org.apache.james.mime4j.field.address;

import java.io.PrintStream;
import java.util.ArrayList;

public class MailboxList
{
  private ArrayList mailboxes;

  public MailboxList(ArrayList paramArrayList, boolean paramBoolean)
  {
    if (paramArrayList != null)
      if (paramBoolean)
      {
        localArrayList = paramArrayList;
        this.mailboxes = localArrayList;
      }
    while (true)
    {
      while (true)
      {
        return;
        localArrayList = (ArrayList)paramArrayList.clone();
      }
      this.mailboxes = new ArrayList(0);
    }
  }

  public Mailbox get(int paramInt)
  {
    if ((paramInt < 0) || (size() <= paramInt))
      throw new IndexOutOfBoundsException();
    return ((Mailbox)this.mailboxes.get(paramInt));
  }

  public void print()
  {
    for (int i = 0; i < size(); ++i)
    {
      Mailbox localMailbox = get(i);
      System.out.println(localMailbox.toString());
    }
  }

  public int size()
  {
    return this.mailboxes.size();
  }
}